from pydantic import BaseModel
from typing import Any

class RestfulErrorResponse(BaseModel):
    code: int  # HTTP状态码或业务错误码
    message: str  # 错误摘要信息
    data: Any | None = None  # 可选的详细错误数据（如验证详情）